package model

type DiaryESModel struct {
	DiaryId string `json:"diary_id"`
	Title   string `json:"title"`
}

func (DiaryESModel) IndexMapping() string {
	mapping := `{
  "mappings": {
    "properties": {
      "title": {
        "type": "text"
      },
      "diary_id": {
        "type": "integer"
      }
    }
  }
}`
	return mapping
}

func (DiaryESModel) IndexName() string {
	return "diary"
}

func NewDiaryESModel() *DiaryESModel {
	return &DiaryESModel{}
}
